
def merge(list_left, list_right):
    return [2, 1]


def merge_sort(mylist):
    """归并排序
    mylist: 待排序数组
    return: 新数组list
    """
    if len(mylist) <= 1:
        print(mylist)
        return mylist

    mid = len(mylist) // 2
    list_left = merge_sort(mylist[:mid])
    list_right = merge_sort(mylist[mid:])
    # return [22, 33]
    return merge(list_left, list_right)


if __name__ == "__main__":
    mylist = [2, 1, 4, 3]
    result = merge_sort(mylist)
    print(f'归并排序后：{result}')